Skip to content

Update GNU Make from 4.1 to 4.2.1 #769

Merged
merged 5 commits into from
May 24, 2018
Merged

Conversation

pmenzel
Copy link
Collaborator

@pmenzel pmenzel commented May 14, 2018

Tested on keineahnung.

Use HTTPS to securely download the source archive.
Copy it from `scripts/TEMPLATE.be0`.
```
gcc -pthread   -g -O2 -Wl,--export-dynamic  -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o guile.o implicit.o job.o load.o loadapi.o main.o misc.o posixos.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o remote-stub.o glob/libglob.a -lguile -lgmp -lcrypt -lm -lltdl    -ldl
glob/libglob.a(glob.o): In function `glob_in_dir':
/dev/shm/bee-root/make/make-4.2.1-0/source/glob/glob.c:1367: undefined reference to `__alloca'
/dev/shm/bee-root/make/make-4.2.1-0/source/glob/glob.c:1342: undefined reference to `__alloca'
/dev/shm/bee-root/make/make-4.2.1-0/source/glob/glob.c:1283: undefined reference to `__alloca'
/dev/shm/bee-root/make/make-4.2.1-0/source/glob/glob.c:1256: undefined reference to `__alloca'
glob/libglob.a(glob.o): In function `glob':
/dev/shm/bee-root/make/make-4.2.1-0/source/glob/glob.c:581: undefined reference to `__alloca'
glob/libglob.a(glob.o):/dev/shm/bee-root/make/make-4.2.1-0/source/glob/glob.c:732: more undefined references to `__alloca' follow
collect2: error: ld returned 1 exit status
```

[1]: https://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4
[2]: https://lists.nongnu.org/archive/html/bug-make/2017-11/msg00027.html
@thomas
Copy link
Collaborator

thomas commented May 14, 2018

Hi Paul,
same issue with the build (I guess), but different solution found in Slackware-current:

--- make-4.2.1.orig/glob/glob.c 2013-10-20 12:14:38.000000000 -0500
+++ make-4.2.1/glob/glob.c      2018-02-16 14:41:18.956182332 -0600
@@ -208,28 +208,9 @@
 #endif /* __GNU_LIBRARY__ || __DJGPP__ */


-#if !defined __alloca && !defined __GNU_LIBRARY__
-
-# ifdef        __GNUC__
-#  undef alloca
-#  define alloca(n)    __builtin_alloca (n)
-# else /* Not GCC.  */
-#  ifdef HAVE_ALLOCA_H
 #   include <alloca.h>
-#  else        /* Not HAVE_ALLOCA_H.  */
-#   ifndef _AIX
-#    ifdef WINDOWS32
-#     include <malloc.h>
-#    else
-extern char *alloca ();
-#    endif /* WINDOWS32 */
-#   endif /* Not _AIX.  */
-#  endif /* sparc or HAVE_ALLOCA_H.  */
-# endif        /* GCC.  */
-
 # define __alloca      alloca

-#endif

 #ifndef __GNU_LIBRARY__
 # define __stat stat

@pmenzel
Copy link
Collaborator Author

pmenzel commented May 17, 2018

@thomas, thank you for checking. My patch is the upstream patch. This should be good to go.

@donald donald merged commit 09f1588 into master May 24, 2018
@thomas
Copy link
Collaborator

thomas commented Jun 25, 2018

Ooops,
I thougt this was merged already, the installed make says GNU Make 4.2.90.
My main concern is that this version doesn't build a current kernel w/o patching the source tree.
Has this changed with the to be installed version?

Ooops 2:
I've stumbled over an old mail in my git-hub folder, and thought it was a new one - sorry.
(Although my concerns remain)

@pmenzel
Copy link
Collaborator Author

pmenzel commented Jun 25, 2018 via email

@pmenzel
Copy link
Collaborator Author

pmenzel commented Jun 25, 2018 via email

@thomas
Copy link
Collaborator

thomas commented Jun 25, 2018

Thanks,
during the last kernel test build I've realized it rather quickly, and snooped in the bee file.
But why is it called version 4.2.1, whilst 'make -v' says 4.2.90 ?

@pmenzel
Copy link
Collaborator Author

pmenzel commented Jun 25, 2018 via email

@donald donald deleted the update-make-from-4.1-to-4.2.1 branch September 14, 2018 08:47
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants